﻿namespace EFS.RC.Wallboard.Common.Config.Sections
{
	public static class RSS
	{
		static RSS()
		{
			// load
			LoadConfig();
		}

		#region Properties
		/// Property Url: Get, Set
		public static System.String Url { get; private set; }

		/// Property ReadCount: Get, Set
		public static System.Int32 ReadCount { get; private set; }

		/// Property DelayMilliseconds: Get, Set
		public static System.Int32 DelayMilliseconds { get; private set; }
		#endregion

		/// LoadConfig
		private static void LoadConfig()
		{
			// get values
			System.Collections.Specialized.NameValueCollection nvc =
				(System.Collections.Specialized.NameValueCollection)System.Configuration.ConfigurationManager.GetSection("RSS");
			EFS.Common.Verify.Reference(nvc, "RSS");

			// read
			Url = EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "Url");
			ReadCount = System.Int32.Parse(EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "ReadCount"));
			DelayMilliseconds = System.Int32.Parse(EFS.RC.Wallboard.Common.Config.Sections.Functions.GetSectionEntryValue(nvc, "DelayMilliseconds"));
		}
	}

}